package com.zjitc.backend_shop.pojo;

/*
 * @Author: 俞杰
 * @Time: 2024/12/16 16:19
 * */

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;


@Data
@Table(name = "vueshop_user")
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "用户实体类")
public class User {
    @Id
    // 主键回填
    @KeySql(useGeneratedKeys = true)
    @Schema(description = "编号")
    // 编号, 主键
    private Integer id;
    @Schema(description = "用户名")
    // 用户名
    private String username;
    @Schema(description = "密码")
    // 密码
    private String password;
    @Schema(description = "盐")
    // 盐, 用于MD5加密
    private String salt;
    @Schema(description = "头像")
    // 头像
    private String avatar;
    @Schema(description = "状态")
    private Boolean state;

}
